
#ifndef CAMERA_H
#define CAMERA_H

#include <Windows.h>
#include <xnamath.h>

class Camera
{
	public:	
		Camera();
		Camera(	float posx, float posy, float posz, 
				float lookx, float looky, float lookz, 
				float upx, float upy, float upz, 
				float rightx, float righty, float rightz);
		
		~Camera();

		XMFLOAT3 getPosVector3() const { return XMFLOAT3(v_Pos.x, v_Pos.y, v_Pos.z); }
		XMFLOAT4 getPosVector() const { return v_Pos; }
		XMFLOAT4 getLookVector() const { return v_Look; }
		XMFLOAT4 getRightVector() const { return v_Right; }
		XMFLOAT4 getUpVector() const { return v_Up; }
		
		void setLookVector(float x, float y, float z)	{ v_Look.x = x; v_Look.y = y; v_Look.z = z; v_Look.w = 0.0f; }
		void setUpVector(float x, float y, float z)	{ v_Up.x = x; v_Up.y = y; v_Up.z = z; v_Up.w = 0; }
		void setRightVector(float x, float y, float z) { v_Right.x = x; v_Right.y = y; v_Right.z = z; v_Right.w = 0.0f; }
		void setPosVector(float x, float y, float z)	{ v_Pos.x = x; v_Pos.y = y; v_Pos.z = z; v_Pos.w = 1.0f; }



		void walkForward(float amount);
		void walkSide(float amount);

		void rotateX(float amount);
		void rotateY(float amount);
		
		void setProjection(float fovy, float aspect, float zn, float zf);
		
		XMMATRIX getProjectionMatrix() const;
		XMMATRIX getViewMatrix() const;

		

		void update();

	private:

		XMFLOAT4 v_Pos;
		XMFLOAT4 v_Look;
		XMFLOAT4 v_Right;
		XMFLOAT4 v_Up;
		XMFLOAT4X4 m_Projection;

};
		
#endif